@layout("/backend/common/_container.html"){
<div class="dhcc-form" id="positionInfoForm">

    <#Hidden id="id" value=""/>

    <#Input id="code" name="编码"/>
    <#Input id="name" name="名称"/>
    <#Radio id="levels" name="职别" map="${positiontype}"/>
    <#Input id="weight" name="排序"/>
    <#Textarea id="description" name="描述"/>
    <div class="toolbar">
        <#Button name="保存" id="ensure" icon="icon-w-save" clickFun="PositionInfoDlg.addSubmit()"/>
        <#Button btnCss="l-bt-red" name="关闭" id="cancel" icon="icon-w-close" clickFun="PositionInfoDlg.close()"/>
    </div>
</div>
<script src="${ctxPath}/static/backend/system/position/position_info.js"></script>
<script>
    $("#code").blur(function () {
        var codes = $("#code").val();
        var ajax = new $ax(Sys.backendPath + "/position/codevalidate", function (data) {
            if(data.msg == false){
                Sys.error("该编码重复，请换一个！");
                $("#code")[0].focus();
            }
        }, function (data) {
            Sys.error("失败!");
        });
        ajax.set("code",codes);
        ajax.start();
    })
</script>
@}
